#ifndef							__APISOUND_H__
#	define						__APISOUND_H__

#	include						"IApiSound.h"
#	include						"IOrder.h"
#	include						"SoundManager.h"
#	include						"IEncodedSoundPacket.h"
#	include						"ISoundPacket.h"

class							ApiSound : public QObject, public IApiSound
{
  Q_OBJECT

public:
	ApiSound(SoundManager &);
	virtual ~ApiSound();

private:
	SoundManager				&_controller;

public:
	virtual void				decode(IEncodedSoundPacket *, ISoundPacket *);
	virtual void				encode(ISoundPacket *, IEncodedSoundPacket *);
	virtual ISoundPacket		*decode(IEncodedSoundPacket *);
	virtual IEncodedSoundPacket	*encode(ISoundPacket *);
	virtual	void				setInput(bool);
	virtual	void				setOutput(bool);

	virtual void				play(ISoundPacket *, unsigned int);
	virtual void				takeOrder(IOrder *);
	virtual IEncodedSoundPacket	*getIEncodedSoundPacket();

public slots:
	virtual void				readBufferFull(ISoundPacket *packet);

signals:
	virtual void                            _inputReady(ISoundPacket *packet);
};

#endif							// !__APISOUND_H__
